close all;

reg = 1;

figure;
hold on;
method = 1;
plot(out{method,reg}.Time, out{method,reg}.RMSE, 'linewidth', 2);
method = 2;
plot(out{method,reg}.Time, out{method,reg}.RMSE, 'linewidth', 2);
method = 3;
plot(out{method,reg}.Time, out{method,reg}.RMSE, 'linewidth', 2);
hold on;
method = 4;
plot(out{method,reg}.Time, out{method,reg}.RMSE, 'linewidth', 2);

% axis([0, 200, 0.8, 1]);
xlabel('time(second)');
ylabel('testing RMSE');
legend('APG', 'Soft-Impute', 'Active', 'fastNOCOL');

figure;
method = 1;
% temp = out{method,reg}.obj - min(out{method,reg}.obj);
temp = out{method,reg}.obj;
semilogy(out{method,reg}.Time, temp, 'linewidth', 2);
hold on;
method = 2;
% temp = out{method,reg}.obj - min(out{method,reg}.obj);
temp = out{method,reg}.obj;
semilogy(out{method,reg}.Time, temp, 'linewidth', 2);
hold on;
method = 3;
% temp = out{method,reg}.obj - min(out{method,reg}.obj);
temp = out{method,reg}.obj;
semilogy(out{method,reg}.Time, temp, 'linewidth', 2);
hold on;
method = 4;
% temp = out{method,reg}.obj - min(out{method,reg}.obj);
temp = out{method,reg}.obj;
semilogy(out{method,reg}.Time, temp, 'linewidth', 2);

% axis([0, 5, 0.87, 1]);
xlabel('time(second)');
ylabel('objective minus best');
legend('APG', 'Soft-Impute', 'Active', 'fastNOCOL');
